package com.syg.SpringMVC._02_SpringMVC_Annotation;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller//这里用@Component为什么不可以
public class _01_SpringMVC {
    public _01_SpringMVC() {
        System.out.println("该构造方法只执行一次,由此可见SpringMVC是单例模式");
    }

    @RequestMapping("hello.do")
    public void test1(){
        System.out.println("能进来嘛？");
    }
}
